package ${package.Entity};


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import BaseDO;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDate;
<#list table.importPackages as pkg>
    <#if pkg == "java.util.Date">
        import ${pkg};
    </#if>
    <#if pkg == "import java.time.LocalDate">
        import ${pkg};
    </#if>
</#list>

/**
* ${table.name} : ${table.comment!}
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ${entity} extends BaseDO {

<#-- ----------  属性私有化  ---------->
<#list table.fields as field>
    <#if field.keyFlag>
        <#assign keyPropertyName="${field.propertyName}"/>
    </#if>

    <#if field.keyFlag>
    <#-- 主键 -->
        /**
        * 主键 : ${field.name},  ${field.comment!}
        */
        @TableId(type = IdType.ASSIGN_ID)
    <#-- 普通字段 -->
    <#elseif !field.keyFlag>
        /**
        * ${field.name},  ${field.comment!}
        */
        @TableField(value = "${field.name}")
    </#if>
<#-- 乐观锁注解 -->
    <#if (versionFieldName!"") == field.name>
        @Version
    </#if>
<#-- 逻辑删除注解 -->
    <#if (logicDeleteFieldName!"") == field.name>
        @TableLogic
    </#if>
    <#if field.propertyType == "LocalDateTime">
        private Date ${field.propertyName};
    </#if>
    <#if field.propertyType != "LocalDateTime">
        private ${field.propertyType} ${field.propertyName};
    </#if>
</#list>

}